package it.heima.utils;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;

public class SessionFactoryUtils {
private static SessionFactory sessionFactory;
private static Configuration config;
static {
	config=new Configuration().configure();
	sessionFactory=config.buildSessionFactory();
}
public static Session getSessionFactory(){
	return sessionFactory.openSession();
}
}
